# 这个是可以把请求头变成工具
import requests


def get_header():
    # 登录获取令牌

    resp = requests.post(url=" http://ihrm2-test.itheima.net/api/sys/login",
                         json={"mobile": "13800000002", "password": "123456"})
    token = resp.json().get("data")
    #
    req_header = {"Content-Type": "application/json",
                  "Authorization": token}
    return req_header


if __name__ == '__main__':
    res = get_header()
    print(res)
